<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ServiceProviderTypeEdt.aspx.cs" Inherits="ServiceProviderTypeEdt" Title="Untitled Page" %>
<asp:Content ID="cntServiceProviderType" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <br />
        <strong>Service Provider Types<br />
        </strong>
        <br />
        <asp:GridView ID="gvServiceProviderTypes" HeaderStyle-HorizontalAlign="left" EmptyDataText="No Service Provider Types Found" runat="server" AutoGenerateColumns="False" Height="133px"
            Width="571px" AllowPaging="True" AllowSorting="True" OnPageIndexChanging="gvServiceProviderTypes_PageIndexChanging" 
            OnSorting="gvServiceProviderTypes_Sorting" OnRowCommand="gvServiceProviderTypes_RowCommand" OnRowUpdating="gvServiceProviderType_RowUpdating" OnRowDataBound="gvServiceProviderTypes_RowDataBound">
            <Columns>
                <asp:BoundField HeaderText="SP Type ID" DataField="ServiceProviderTypeID" SortExpression="ServiceProviderTypeID" ReadOnly="True" />
                <asp:TemplateField HeaderText="SP Type Name" SortExpression="DisplayName">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" MaxLength="50" Text='<%# Bind("DisplayName") %>' onkeypress="return ValidateKey()" Width="75%"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1">*</asp:RequiredFieldValidator>&nbsp;
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("DisplayName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="SP Type Code" SortExpression="ServiceProviderTypeCode">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" MaxLength="10" Text='<%# Bind("ServiceProviderTypeCode") %>' onkeypress="return ValidateKey()"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("ServiceProviderTypeCode") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:ButtonField Text="edit" ButtonType="Button" CommandName="EditSP" InsertVisible="False" />
                <asp:ButtonField Text="delete" ButtonType="Button" CommandName="DeleteSP" InsertVisible="False" />
                <asp:ButtonField Text="cancel" ButtonType="Button" CommandName="CancelSP" />
            </Columns>
            <PagerSettings Mode="NumericFirstLast"/>
            <HeaderStyle HorizontalAlign="Left" />
        </asp:GridView>

    </div>
    <br />
    <asp:Button ID="btnAddSPT" runat="server" Text="Add Service Provider Type" OnClick="btnAddSPT_Click" />
    <asp:Button id="btnSave" onclick="btnSaveServiceProviderType_Click" runat="server" Text="Save Service Provider Type"></asp:Button>

    <asp:TextBox Visible="false" ID="tbSortDirection" runat="server"></asp:TextBox>
    <asp:TextBox Visible="false" ID="tbPage" runat="server"></asp:TextBox>
    <asp:TextBox Visible="false" ID="tbSortProperty" runat="server"></asp:TextBox>    
</asp:Content>

